Contribution to deterministic top-down analysis of context-free languages
نویسنده
چکیده
In the present paper a generalization of ZX(A:)-grammars is given, the notion of the switching function for such grammars is introduced and the model of the Parsing Machine using the switch ing function is given. We introduce the necessary notions and notation, mainly according to D. E. Knuth: An alphabet X is a finite nonempty set of symbols, and X* denotes the set of all strings on the alphabet X. The length of a string u is denoted by \u\. A context free grammar is a 4-tuple (T N, P, S) where T, N are disjoint alphabets called terminal and nonterminal alphabets respectively; P is a finite nonempty set of productions. A production is a pair denoted by A—* u, where AeN,u e(N u T)*; S e N is an initial symbol. be a context-free grammar. For u, ue(TuiV)* let us write u => v if there exist strings x, y,we (Tu N)*, such that u = xAy, v = xwy and A-» we P. If x e T* we write u => v, if y e T* we write u => v. The reflexive transitive completion of relation => is denoted by =>* and the transi tive completion of => is denoted by => +. Similarly =>*, => + , =>*, => +. The set L(G) = {u e T* : S => + M} is called a context^ree language generated by G. If w^e (Tu JV)* we write L(w) = {« e T* : w =>* M}.
منابع مشابه
A contribution to the top-to-bottom recognizer rehabilitation
The method of parsing of the deterministic context-free languages described by D. E. Knuth in [1] is interpreted there only as a bottom-to-top analysis. It is shown here that this method also admits to be treated as a kind of the top to-bottom parsing.
متن کاملTop-down Deterministic Languages
Two new families of languages, the F(k) and U(k) languages, are Introduced each of which is, in some sense, a generalization of top-down deterministic languages. This leads us to new characterizations of s-grammars and LL(1) languages. We include a characterization of the unambiguous context-free languages, generalizations of the equivalence relation on s-grammars to LL(k) grammars, and a summa...
متن کاملContext-Free Grammars with Storage
Context-free S grammars are introduced, for arbitrary (storage) type S, as a uniform framework for recursion-based grammars, automata, and transducers, viewed as programs. To each occurrence of a nonterminal of a context-free S grammar an object of type S is associated, that can be acted upon by tests and operations, as indicated in the rules of the grammar. Taking particular storage types give...
متن کاملCh(k) Grammars: A Characterization of LL(k) Languages
From the point of view of parsing the LL(K] grammars constitute a very attractive class of context-free grammars. For each LL{K] grammar a top-down parsing algorithm can be devised which is essentially a one-state deterministic push-down automaton. From a more theoretiG point of view LL[K) grammars are attractive as well. It is well-known, for example, that it is decidable whether two LLfk) gra...
متن کاملLeft Recursion in Parsing Expression Grammars
Parsing Expression Grammars (PEGs) are a formalism that can describe all deterministic context-free languages through a set of rules that specify a top-down parser for some language. PEGs are easy to use, and there are efficient implementations of PEG libraries in several programming languages. A frequently missed feature of PEGs is left recursion, which is commonly used in Context-Free Grammar...
متن کاملThe Copying Power of One-State Tree Transducers
One-state deterministic top-down tree transducers (or, tree homomorphisms) cannot handle “prime copying,” i.e., their class of output (string) languages is not closed under the operation L --) {$(w%~‘“’ 1 w E L, f(n) > 11, where f is any integer function whose range contains numbers with arbitrarily large prime factors (such as a polynomial). The exact amount of nonclosure under these copying o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Kybernetika
دوره 4 شماره
صفحات -
تاریخ انتشار 1968